<div class="categories view">
<h2><?php  __('Category');?></h2>
	<dl><?php $i = 0; $class = ' class="altrow"';?>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Cat Index'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $category['Category']['cat_index']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Cat Name'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $category['Category']['cat_name']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Project'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $html->link($category['Project']['proj_name'], array('controller'=> 'projects', 'action'=>'view', $category['Project']['proj_index'])); ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Cat Description'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $category['Category']['cat_description']; ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<ul>
		<li><?php echo $html->link(__('Edit Category', true), array('action'=>'edit', $category['Category']['cat_index'])); ?> </li>
		<li><?php echo $html->link(__('Delete Category', true), array('action'=>'delete', $category['Category']['cat_index']), null, sprintf(__('Are you sure you want to delete # %s?', true), $category['Category']['cat_index'])); ?> </li>
		<li><?php echo $html->link(__('List Categories', true), array('action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Category', true), array('action'=>'add')); ?> </li>
		<li><?php echo $html->link(__('List Projects', true), array('controller'=> 'projects', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Project', true), array('controller'=> 'projects', 'action'=>'add')); ?> </li>
		<li><?php echo $html->link(__('List Requirements', true), array('controller'=> 'requirements', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Requirement', true), array('controller'=> 'requirements', 'action'=>'add')); ?> </li>
		<li><?php echo $html->link(__('List Procedures', true), array('controller'=> 'procedures', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Procedure', true), array('controller'=> 'procedures', 'action'=>'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php __('Related Requirements');?></h3>
	<?php if (!empty($category['Requirement'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('R Index'); ?></th>
		<th><?php __('R Reference'); ?></th>
		<th><?php __('R Title'); ?></th>
		<th><?php __('R Description'); ?></th>
		<th><?php __('R Category'); ?></th>
		<th><?php __('R Applicability'); ?></th>
		<th><?php __('R Conformance'); ?></th>
		<th><?php __('R Notes'); ?></th>
		<th><?php __('R Status'); ?></th>
		<th><?php __('R Project'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($category['Requirement'] as $requirement):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $requirement['r_index'];?></td>
			<td><?php echo $requirement['r_reference'];?></td>
			<td><?php echo $requirement['r_title'];?></td>
			<td><?php echo $requirement['r_description'];?></td>
			<td><?php echo $requirement['r_category'];?></td>
			<td><?php echo $requirement['r_applicability'];?></td>
			<td><?php echo $requirement['r_conformance'];?></td>
			<td><?php echo $requirement['r_notes'];?></td>
			<td><?php echo $requirement['r_status'];?></td>
			<td><?php echo $requirement['r_project'];?></td>
			<td class="actions">
				<?php echo $html->link(__('View', true), array('controller'=> 'requirements', 'action'=>'view', $requirement['r_index'])); ?>
				<?php echo $html->link(__('Edit', true), array('controller'=> 'requirements', 'action'=>'edit', $requirement['r_index'])); ?>
				<?php echo $html->link(__('Delete', true), array('controller'=> 'requirements', 'action'=>'delete', $requirement['r_index']), null, sprintf(__('Are you sure you want to delete # %s?', true), $requirement['r_index'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $html->link(__('New Requirement', true), array('controller'=> 'requirements', 'action'=>'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php __('Related Procedures');?></h3>
	<?php if (!empty($category['Procedure'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Proc Index'); ?></th>
		<th><?php __('Proc Reference'); ?></th>
		<th><?php __('Proc Title'); ?></th>
		<th><?php __('Proc Scope'); ?></th>
		<th><?php __('Proc Duration'); ?></th>
		<th><?php __('Proc Prerequisites'); ?></th>
		<th><?php __('Proc Regression'); ?></th>
		<th><?php __('Proc Ptype'); ?></th>
		<th><?php __('Proc Phase'); ?></th>
		<th><?php __('Proc Part'); ?></th>
		<th><?php __('Proc Version'); ?></th>
		<th><?php __('Proc Cat'); ?></th>
		<th><?php __('Proc Created By'); ?></th>
		<th><?php __('Proc Created Date'); ?></th>
		<th><?php __('Proc Updated By'); ?></th>
		<th><?php __('Proc Updated Date'); ?></th>
		<th><?php __('Proc Deleted By'); ?></th>
		<th><?php __('Proc Deleted Date'); ?></th>
		<th><?php __('Proc Project'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($category['Procedure'] as $procedure):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $procedure['proc_index'];?></td>
			<td><?php echo $procedure['proc_reference'];?></td>
			<td><?php echo $procedure['proc_title'];?></td>
			<td><?php echo $procedure['proc_scope'];?></td>
			<td><?php echo $procedure['proc_duration'];?></td>
			<td><?php echo $procedure['proc_prerequisites'];?></td>
			<td><?php echo $procedure['proc_regression'];?></td>
			<td><?php echo $procedure['proc_ptype'];?></td>
			<td><?php echo $procedure['proc_phase'];?></td>
			<td><?php echo $procedure['proc_part'];?></td>
			<td><?php echo $procedure['proc_version'];?></td>
			<td><?php echo $procedure['proc_cat'];?></td>
			<td><?php echo $procedure['proc_created_by'];?></td>
			<td><?php echo $procedure['proc_created_date'];?></td>
			<td><?php echo $procedure['proc_updated_by'];?></td>
			<td><?php echo $procedure['proc_updated_date'];?></td>
			<td><?php echo $procedure['proc_deleted_by'];?></td>
			<td><?php echo $procedure['proc_deleted_date'];?></td>
			<td><?php echo $procedure['proc_project'];?></td>
			<td class="actions">
				<?php echo $html->link(__('View', true), array('controller'=> 'procedures', 'action'=>'view', $procedure['proc_index'])); ?>
				<?php echo $html->link(__('Edit', true), array('controller'=> 'procedures', 'action'=>'edit', $procedure['proc_index'])); ?>
				<?php echo $html->link(__('Delete', true), array('controller'=> 'procedures', 'action'=>'delete', $procedure['proc_index']), null, sprintf(__('Are you sure you want to delete # %s?', true), $procedure['proc_index'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $html->link(__('New Procedure', true), array('controller'=> 'procedures', 'action'=>'add'));?> </li>
		</ul>
	</div>
</div>
